package com.tosit.bmx.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 页面跳转
 *
 * @author tsl
 * @create 2018-04-19 11:19
 **/
@Controller
@RequestMapping
public class PageController {
    /**
     *   跳转3级界面
     *
     * @date 2018/4/22 16:15
     * @author tsl
     * @param root 文件名
     * @param parent 文件名
     * @param page 界面
     * @return
     */
    @RequestMapping(value = "/p/{root}/{parent}/{page}",method = RequestMethod.GET)
    public String pagetoAdmin(@PathVariable String root,@PathVariable String page,@PathVariable String parent) {
       return root+"/"+parent+"/"+page;
    }
    /**
     * 跳转2级界面
     *
     *  @author tsl
     * @date 2018/4/22 16:15
     * @param root 文件名
     * @param page 界面
     * @return
     */
    @RequestMapping(value = "/p/{root}/{page}",method = RequestMethod.GET)
    public String pagetoAdmin(@PathVariable String root, @PathVariable String page) {
         return root+"/"+page;
    }





}
